var help_logged = {
	data: {},
	dataInit: function() {
		help_logged.fn.initialize();
		//		help_logged.fn.list_init();
	},
	eventBind: function() {},
	fn: {
		list_init: function() {
			$.ajax({
				type: 'GET',
				url: config.host + "",
				data: {

				},
				dataType: "jsonp",
				success: function(list) {
					if (list.status == 1) {
						console.log("请求成功");
						help_logged.fn.dataFill(list);
					} else {
						$.alert(list.data);
					}
				},
				error: function(xhr, type) {
					console.log("请求失败");
					$.alert('网络异常');
				}
			});
		},
		dataFill: function(list) {
			if (list) {
				var data = {
					total: list.data.length,
					list: list,
					host: localStorage.getItem('file'),
				};
				var html = template('list_kq_content', data);
				document.getElementById('notice_list').innerHTML = html;
			}
		},
		tagFill: function() {
			var data = {
				bar_Title: '帮助',
				ChaBuDaoXinXi: '查不到信息',
			};
			var tem = template('page', data);
			document.getElementById('page').innerHTML = tem;
		},
		initialize: function() {
			help_logged.fn.tagFill();
		},
		cordavaDataGet: function() {
			help_logged.dataInit();
			help_logged.eventBind();
		},		
		quit: function() {
			//重定义对话框：不仅在help.css中对对话框配色样式做了重定义，
			//          同时修改了sm.min.js中对确定按钮颜色的定义以及对话框中下列两段文字内容显示位置调整为居左 
			//          荣荣     liuqingrong2005@126.com  2016-7-31
			$.confirm('<span style="color:#999999;">你确认想要退出您的账户吗?</span>','<span style="color:#000;">退出登录</span>', function() {

				$.ajax({
					type: "get",
					//如下url需根据实际API地址进行修改，本处只给出了示例
					//      config.host取自res/js/config.js配置文件，即指API接口服务器地址
					//     `荣荣     liuqingrong2005@126.com  2016-7-31
					url: config.host + "user/user/logout",
					data: {
						token: localStorage.getItem('token'),
					},
					dataType: 'jsonp',
					success: function(data) {
						if (data.status == '1') {
							localStorage.clear();
							localStorage.setItem("hasUsed", "1");
							window.location.href = '../login.html';
						} else {
							$.alert('网络异常');
						}
					},
					error: function() {
						$.alert('网络异常');
					}
				});

			});
		}
	}
}
Zepto(function($) {
	help_logged.fn.cordavaDataGet();
});